package com.guowei.web.util;

public class PathUtilFactory {

    private static volatile PathUtil pathUtil;

    public static PathUtil instance() {
        if (pathUtil == null) {
            synchronized (PathUtilFactory.class) {
                if (pathUtil == null) {
                    String os = System.getProperty("os.name").toLowerCase();
                    if (os.contains("windows")) {
                        pathUtil = new WindowsPathUtil();
                    } else {
                        pathUtil = new LinuxPathUtil();
                    }
                }
            }
        }
        return pathUtil;
    }
}
